Z:\to_server\website\mrdcl-learning.com\mrdcl_files\DAT-111\EPS_read_Excel.stp
start data,
!
!Question definitions
!
di $serial,
xt='Serial number',
ds $gender(2),
xt='Gender',
di $age,
xt='Age',
ds $q1(2),
xt='Q1 Whether own motorcycle',
ds $q2(5),
xt='Q2 How long owned current motorcycle',
ds $q3(5),
xt='Q3 Frequency of reading MotorCycle Monthly',
!
!Question definitions end
!
!
!Enter texts here
!
x$gender='Male;Female',
x$q1='Yes;No',
x$q2='Under 1 year;
1 - 2 years;
3 - 5 years;
5 - 10 years;
Over 10 years',
x$q3='Every issue;
Most issues;
Frequently;
Sometimes;
Not very often',
di $serial=1,
m$gender/b.1,
di $age=33,
m$q1/b.1,
m$q2/b,
m$q2/b.3,
m$q3/b.3,
!
!Enter variables that are derived from the original data here
!-------
!-------
!------- N O T E
!
!It will be more efficient to put any variables in the tables stage unless you need them to be on
!the IDF so that they are exported as this could add a lot to the MRDCL code if you have a big
!sample size.
!
ds $vage=$age/16..24,25..34,35..54,>54,
x='16 - 24;
25 - 34;
35 - 54;
55+',
xt='Age group',
!
!End of variables from original data
!
write,
di $serial=2,
m$gender/b.2,
di $age=20,
m$q1/b.2,
m$q2/b,
m$q3/b.2,
!
!Enter variables that are derived from the original data here
!-------
!-------
!------- N O T E
!
!It will be more efficient to put any variables in the tables stage unless you need them to be on
!the IDF so that they are exported as this could add a lot to the MRDCL code if you have a big
!sample size.
!
ds $vage=$age/16..24,25..34,35..54,>54,
x='16 - 24;
25 - 34;
35 - 54;
55+',
xt='Age group',
!
!End of variables from original data
!
write,
di $serial=3,
m$gender/b.1,
di $age=45,
m$q1/b.1,
m$q2/b,
m$q2/b.2,
m$q3/b.2,
!
!Enter variables that are derived from the original data here
!-------
!-------
!------- N O T E
!
!It will be more efficient to put any variables in the tables stage unless you need them to be on
!the IDF so that they are exported as this could add a lot to the MRDCL code if you have a big
!sample size.
!
ds $vage=$age/16..24,25..34,35..54,>54,
x='16 - 24;
25 - 34;
35 - 54;
55+',
xt='Age group',
!
!End of variables from original data
!
write,
di $serial=4,
m$gender/b.2,
di $age=60,
m$q1/b.1,
m$q2/b,
m$q2/b.1,
m$q3/b.1,
!
!Enter variables that are derived from the original data here
!-------
!-------
!------- N O T E
!
!It will be more efficient to put any variables in the tables stage unless you need them to be on
!the IDF so that they are exported as this could add a lot to the MRDCL code if you have a big
!sample size.
!
ds $vage=$age/16..24,25..34,35..54,>54,
x='16 - 24;
25 - 34;
35 - 54;
55+',
xt='Age group',
!
!End of variables from original data
!
write,
di $serial=5,
m$gender/b.1,
di $age=70,
m$q1/b.1,
m$q2/b,
m$q2/b.2,
m$q3/b.5,
!
!Enter variables that are derived from the original data here
!-------
!-------
!------- N O T E
!
!It will be more efficient to put any variables in the tables stage unless you need them to be on
!the IDF so that they are exported as this could add a lot to the MRDCL code if you have a big
!sample size.
!
ds $vage=$age/16..24,25..34,35..54,>54,
x='16 - 24;
25 - 34;
35 - 54;
55+',
xt='Age group',
!
!End of variables from original data
!
write,
di $serial=6,
m$gender/b.2,
di $age=18,
m$q1/b.1,
m$q2/b,
m$q2/b.1,
m$q3/b.4,
!
!Enter variables that are derived from the original data here
!-------
!-------
!------- N O T E
!
!It will be more efficient to put any variables in the tables stage unless you need them to be on
!the IDF so that they are exported as this could add a lot to the MRDCL code if you have a big
!sample size.
!
ds $vage=$age/16..24,25..34,35..54,>54,
x='16 - 24;
25 - 34;
35 - 54;
55+',
xt='Age group',
!
!End of variables from original data
!
write,
di $serial=7,
m$gender/b.1,
di $age=21,
m$q1/b.1,
m$q2/b,
m$q2/b.2,
m$q3/b.3,
!
!Enter variables that are derived from the original data here
!-------
!-------
!------- N O T E
!
!It will be more efficient to put any variables in the tables stage unless you need them to be on
!the IDF so that they are exported as this could add a lot to the MRDCL code if you have a big
!sample size.
!
ds $vage=$age/16..24,25..34,35..54,>54,
x='16 - 24;
25 - 34;
35 - 54;
55+',
xt='Age group',
!
!End of variables from original data
!
write,
di $serial=8,
m$gender/b.2,
di $age=23,
m$q1/b.2,
m$q2/b,
m$q3/b.1,
!
!Enter variables that are derived from the original data here
!-------
!-------
!------- N O T E
!
!It will be more efficient to put any variables in the tables stage unless you need them to be on
!the IDF so that they are exported as this could add a lot to the MRDCL code if you have a big
!sample size.
!
ds $vage=$age/16..24,25..34,35..54,>54,
x='16 - 24;
25 - 34;
35 - 54;
55+',
xt='Age group',
!
!End of variables from original data
!
write,
di $serial=9,
m$gender/b.1,
di $age=34,
m$q1/b.2,
m$q2/b,
m$q3/b.2,
!
!Enter variables that are derived from the original data here
!-------
!-------
!------- N O T E
!
!It will be more efficient to put any variables in the tables stage unless you need them to be on
!the IDF so that they are exported as this could add a lot to the MRDCL code if you have a big
!sample size.
!
ds $vage=$age/16..24,25..34,35..54,>54,
x='16 - 24;
25 - 34;
35 - 54;
55+',
xt='Age group',
!
!End of variables from original data
!
write,
di $serial=10,
m$gender/b.2,
di $age=47,
m$q1/b.1,
m$q2/b,
m$q2/b.2,
m$q3/b.3,
!
!Enter variables that are derived from the original data here
!-------
!-------
!------- N O T E
!
!It will be more efficient to put any variables in the tables stage unless you need them to be on
!the IDF so that they are exported as this could add a lot to the MRDCL code if you have a big
!sample size.
!
ds $vage=$age/16..24,25..34,35..54,>54,
x='16 - 24;
25 - 34;
35 - 54;
55+',
xt='Age group',
!
!End of variables from original data
!
write,
di $serial=11,
m$gender/b.1,
di $age=41,
m$q1/b.1,
m$q2/b,
m$q2/b.4,
m$q3/b.4,
!
!Enter variables that are derived from the original data here
!-------
!-------
!------- N O T E
!
!It will be more efficient to put any variables in the tables stage unless you need them to be on
!the IDF so that they are exported as this could add a lot to the MRDCL code if you have a big
!sample size.
!
ds $vage=$age/16..24,25..34,35..54,>54,
x='16 - 24;
25 - 34;
35 - 54;
55+',
xt='Age group',
!
!End of variables from original data
!
write,
di $serial=12,
m$gender/b.2,
di $age=23,
m$q1/b.1,
m$q2/b,
m$q2/b.4,
m$q3/b.2,
!
!Enter variables that are derived from the original data here
!-------
!-------
!------- N O T E
!
!It will be more efficient to put any variables in the tables stage unless you need them to be on
!the IDF so that they are exported as this could add a lot to the MRDCL code if you have a big
!sample size.
!
ds $vage=$age/16..24,25..34,35..54,>54,
x='16 - 24;
25 - 34;
35 - 54;
55+',
xt='Age group',
!
!End of variables from original data
!
write,
di $serial=13,
m$gender/b.1,
di $age=19,
m$q1/b.1,
m$q2/b,
m$q2/b.4,
m$q3/b.1,
!
!Enter variables that are derived from the original data here
!-------
!-------
!------- N O T E
!
!It will be more efficient to put any variables in the tables stage unless you need them to be on
!the IDF so that they are exported as this could add a lot to the MRDCL code if you have a big
!sample size.
!
ds $vage=$age/16..24,25..34,35..54,>54,
x='16 - 24;
25 - 34;
35 - 54;
55+',
xt='Age group',
!
!End of variables from original data
!
write,
di $serial=14,
m$gender/b.2,
di $age=50,
m$q1/b.2,
m$q2/b,
m$q3/b.2,
!
!Enter variables that are derived from the original data here
!-------
!-------
!------- N O T E
!
!It will be more efficient to put any variables in the tables stage unless you need them to be on
!the IDF so that they are exported as this could add a lot to the MRDCL code if you have a big
!sample size.
!
ds $vage=$age/16..24,25..34,35..54,>54,
x='16 - 24;
25 - 34;
35 - 54;
55+',
xt='Age group',
!
!End of variables from original data
!
write,
di $serial=15,
m$gender/b.1,
di $age=49,
m$q1/b.2,
m$q2/b,
m$q3/b.3,
!
!Enter variables that are derived from the original data here
!-------
!-------
!------- N O T E
!
!It will be more efficient to put any variables in the tables stage unless you need them to be on
!the IDF so that they are exported as this could add a lot to the MRDCL code if you have a big
!sample size.
!
ds $vage=$age/16..24,25..34,35..54,>54,
x='16 - 24;
25 - 34;
35 - 54;
55+',
xt='Age group',
!
!End of variables from original data
!
write,
di $serial=16,
m$gender/b.2,
di $age=66,
m$q1/b.1,
m$q2/b,
m$q2/b.1,
m$q3/b.1,
!
!Enter variables that are derived from the original data here
!-------
!-------
!------- N O T E
!
!It will be more efficient to put any variables in the tables stage unless you need them to be on
!the IDF so that they are exported as this could add a lot to the MRDCL code if you have a big
!sample size.
!
ds $vage=$age/16..24,25..34,35..54,>54,
x='16 - 24;
25 - 34;
35 - 54;
55+',
xt='Age group',
!
!End of variables from original data
!
write,
di $serial=17,
m$gender/b.1,
di $age=19,
m$q1/b.2,
m$q2/b,
m$q3/b.1,
!
!Enter variables that are derived from the original data here
!-------
!-------
!------- N O T E
!
!It will be more efficient to put any variables in the tables stage unless you need them to be on
!the IDF so that they are exported as this could add a lot to the MRDCL code if you have a big
!sample size.
!
ds $vage=$age/16..24,25..34,35..54,>54,
x='16 - 24;
25 - 34;
35 - 54;
55+',
xt='Age group',
!
!End of variables from original data
!
write,
di $serial=18,
m$gender/b.2,
di $age=31,
m$q1/b.1,
m$q2/b,
m$q2/b.3,
m$q3/b.1,
!
!Enter variables that are derived from the original data here
!-------
!-------
!------- N O T E
!
!It will be more efficient to put any variables in the tables stage unless you need them to be on
!the IDF so that they are exported as this could add a lot to the MRDCL code if you have a big
!sample size.
!
ds $vage=$age/16..24,25..34,35..54,>54,
x='16 - 24;
25 - 34;
35 - 54;
55+',
xt='Age group',
!
!End of variables from original data
!
write,
finish data,
start tables,
t#1=$vage * $gender,
t#2=$q1 * $gender,
if $q1/1,t#3=$q2 * $gender,
bt='All who own a motorcycle',
t#4=$q3 * $gender,
finish tables,
